<template>
	<view class="page-content">
		<zm-page-navview title="私人定制" :isBack="true" :borderBottom="false" slot="top" />
		<view class="back-content">
			<AccountPasswordLoginView :logining="isInLogining" @login="clickLoginByAccount" @register="registerAction"
				@forget="forgetAction" />
		</view>
	</view>
</template>

<script>
	import AccountPasswordLoginView from './components/account-password-login-view.vue';
	export default {
		name: 'loginAccountPage',
		components: {
			AccountPasswordLoginView,
		},

		data() {
			return {
				isInLogining: false,
			};
		},
		onLoad(options) {

		},
		methods: {
			// 点击登录
			clickLoginByAccount(e) {
				uni.showLoading({
					mask: true,
					title: '登录中...'
				})
				this.isInLogining = true;
				let that = this;
				setTimeout(() => {
					that.isInLogining = false;
					uni.hideLoading();	
					uni.navigateTo({
						url: '/uni_modules/zm-login-account/pages/login/captchaVerifyPage?mobile=' + (e
							.mobile || "") + '&password=' + (e.psdStr || ""),
					});
				}, 1500)
			},
			
			// 点击注册
			registerAction() {
				uni.showToast({
					title:'点击去注册',
					icon:'none'
				})
			},
			
			// 点击忘记密码
			forgetAction() {
				uni.showToast({
					title:'点击忘记密码',
					icon:'none'
				})
			},
		},
	}
</script>

<style lang="scss" scoped>
	.page-content {
		position: absolute;
		width: 100%;
		height: 100%;
		background: #F5F9FC;

		.back-content {
			margin: 30rpx 30rpx;
			padding: 30rpx;
			//  底部安全高度，顺序不要乱
			// padding-bottom: constant(safe-area-inset-bottom);
			// padding-bottom: env(safe-area-inset-bottom);
			height: calc(100vh - 60rpx - constant(safe-area-inset-bottom) - 180rpx);
			height: calc(100vh - 60rpx - env(safe-area-inset-bottom) - 180rpx);
			border-radius: 20rpx;
			box-shadow: 0 2px 10px 0 rgba(0, 0, 0, 0.05);
			background: #FFFFFF;
		}
	}
</style>
